﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditFirst.aspx.cs" Inherits="news_EditFirst" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<script src="../js/jquery-1.3.2.min.js" type="text/javascript"></script>

<head runat="server">
    <title></title>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#btnOk').click(function () {
                if ($('#txtTitle').val() == '') {
                    alert('标题不能为空');
                    $('#txtTitle').focus();
                    return false;
                }
                if ($('#txtContent').val() == '') {
                    alert('内容不能为空');
                    $('#txtContent').focus();
                    return false;
                }
                if ($('#txtUrl').val() == '') {
                    alert('链接不能为空');
                    $('#txtUrl').focus();
                    return false;
                }
            });
            $('#btnReturn').click(function () {
                document.location = 'EditFirstNews.aspx';
            });
            $('#btnClear').click(function () {
                $('#txtTitle').val('');
                $('#txtContent').val('');
                $('#txtUrl').val('');
            });
        });
    </script>
</head>
<body>
    <a href="../Topics/Topics.aspx"></a>
    <form id="form1" runat="server">
    <div>
        <asp:Label ID="lblModuleName" runat="server" />&nbsp;&nbsp;
        <input
        id="btnReturn" class="common_button" type="button" value="返回" /><br />
    <table style="height: 112px; width: 882px">
        <tr>
            <th>
                标题
            </th>
            <td>
                <asp:TextBox ID="txtTitle" runat="server" Width="514px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <th>
                内容
            </th>
           <td>
             <asp:TextBox ID="txtContent" runat="server" TextMode="MultiLine" Height="197px" 
                   Width="522px"></asp:TextBox>
           </td>
        </tr>
        <tr>
            <th>
                链接
            </th>
            <td>
                <asp:TextBox ID="txtUrl" runat="server" Width="516px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Button ID="btnOk" runat="server" Text="确定" onclick="btnOk_Click" /><asp:Button ID="btnClear"
                    runat="server" Text="清除" /></td>
        </tr>
    </table>
    </div>
    </form>
</body>
</html>
